﻿/*
 * Ext Gantt 1.2
 * Copyright(c) 2009-2011 Mats Bryntse Consulting
 * mats@ext-scheduler.com
 * http://www.ext-scheduler.com/license.html
 *
 */

Ext.ns('Sch.gantt');

Sch.gantt.MilestoneTemplate = function(cfg) {
    return new Ext.XTemplate(
        '<div class="sch-event-wrap sch-gantt-milestone {ctcls} x-unselectable" style="left:{leftOffset}px">'+
            // Left label 
            '<div class="sch-gantt-labelct-left"><label class="sch-gantt-label sch-gantt-label-left">{leftLabel}</label></div>'+
                    
            // Milestone indicator
            '<div id="{id}" class="sch-gantt-item sch-gantt-milestone-diamond {internalcls} {cls}" unselectable="on" style="{style}">'+
                // Dependency terminals
                (cfg.enableDependencyDragDrop ? '<div class="sch-gantt-terminal sch-gantt-terminal-start"></div><div class="sch-gantt-terminal sch-gantt-terminal-end"></div>' : '') +
            '</div>'+
                    
            // Right label 
            '<div class="sch-gantt-labelct-right"><label class="sch-gantt-label sch-gantt-label-right">{rightLabel}</label></div>'+
        '</div>' +

        // Baseline Task bar
        (cfg.showBaseline ? '<div id="{id}-base" class="sch-gantt-task-diamond-baseline {basecls}" style="left:{[values.baseLeftOffset - 8]}px;"></div>' : ''),
    {
        compiled: true,      
        disableFormats: true 
    });
};